package org.hibernate.onetomany.dao.impl;

import org.hibernate.onetomany.base.BaseDao;
import org.hibernate.onetomany.dao.ClassesDao;
import org.hibernate.onetomany.entity.Classes;
import org.springframework.stereotype.Repository;

@Repository("classesDao")
public class ClassesDaoImpl extends BaseDao implements ClassesDao{

	public void saveClasses(Classes classes) {
		getCurrentSession().save(classes);
	}
	
	public void updateClasses(Classes classes) {
		getCurrentSession().update(classes);
//		getCurrentSession().flush();
	}

	public Classes findById(int id) {
		return (Classes) getCurrentSession().get(Classes.class, id);
	}

	
	
}
